package com.xxh.ioc;

import com.xxh.entity.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class testIOC {

    public static void main(String[] args) {

        ApplicationContext ac = new ClassPathXmlApplicationContext("bean1.xml");
        User bean = ac.getBean(User.class);
        // User user = new User(); 明白了吧
        System.out.printf(String.valueOf(bean));
    }
}
